<template>
  <MyDialog
    v-model="isVisible"
    :type="type"
    class="audit-dialog-wrapper"
    width="800"
    :dialog-title="dialogTitle"
    :need-modal="needModal"
    @closed="closed"
  >
    <my-table :columns="columns" :table-data="tableData" />
    <template #footer>
      <my-button type="reset" title="关闭" @click="closed" />
    </template>
  </MyDialog>
</template>

<script setup lang="ts" name="addAb01">
import { ref } from 'vue';
import { addAb01, getAb01, updateAb01 } from '@/api/yuanshidian/ab01';
const { proxy } = getCurrentInstance();
const props = defineProps(
  {
    dialogTitle: {
      type: String,
      default: '审核记录'
    },
    needModal: {
      type: Boolean,
      default: true
    },
    modelValue: {
      type: Boolean,
      default: false
    },
    currentRow: {
      type: Object,
      default: () => {}
    }
  },
  ['modelValue']
);
const state = reactive({
  tableData: [{}],
  columns: [
    { label: '序号', type: 'index', width: '55', prop: 'index' },
    { label: '审核结果', prop: 'rchkFlag', align: 'center' },
    { label: '审核意见', prop: 'rchkFlag', align: 'center' },
    { label: '审核人', prop: 'rchkFlag', align: 'center' },
    { label: '审核时间', prop: 'rchkFlag', align: 'center' }
  ]
});
const { tableData, columns } = toRefs(state);
const isVisible = ref(false);
watch(
  () => props.modelValue,
  async (v) => {
    isVisible.value = v;
    if (props.currentRow.id) {
    }
  },
  { immediate: true, deep: true }
);
const emit = defineEmits(['update:modelValue']);
const closed = () => {
  emit('update:modelValue');
};
</script>
